//系统变量状态
const SYSTEM_INFO = uni.getSystemInfoSync()
//导航栏安全距离
export const getStatusBarHeight =()=> SYSTEM_INFO.statusBarHeight || 15

export const getTitleBarHeight =()=> { 
	if(uni.getMenuButtonBoundingClientRect){//胶囊按钮状态
		let {top,height} = uni.getMenuButtonBoundingClientRect() 
		//标题栏高度
		return (top - getStatusBarHeight())*2 + height
	}else{
		return 40;
	}
}


export const getNavBarHeight =()=> getTitleBarHeight()+getStatusBarHeight();

//抖音图标
export const getLeftIconLeft = ()=>{
	
	// #ifdef MP-TOUTIAO
		let {leftIcon:{left,width}} = tt.getCustomButtonBoundingClientRect
		return left+parseInt(width)
	// #endif
	
	// #ifndef MP-TOUTIAO
		return 0
	// #endif
	
}